import { defineStore } from 'pinia';

export const useCounterStore = defineStore('counter', {
  state: () => ({
    count: 0.0
  }),
  actions: {
    add() {
      this.count++;
    },
    sub() {
      if (this.count <= 0) return;
      this.count--;
    }
  }
});